﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace TangGuo.UserControls
{

    /// <summary>
    /// UpgradeEffect.xaml 的交互逻辑
    /// </summary>
    public partial class UpgradeEffect : UserControl
    {
        public int Col;
        public int Row;
        public UpgradeEffect(int x, int y)
        {
            InitializeComponent();
            Col = x; Row = y;
            double xd = (y % 2) == 0 ? x * 90.0 : 45.0 + x * 90.0;
            xd -= 80;
            double yd = y * 77 - 72;
            SetValue(Canvas.LeftProperty, xd);
            SetValue(Canvas.TopProperty, yd);
            Canvas.SetZIndex(this, 10);

        }
    }
}
